<?php
namespace app\admin\validate;

use think\Validate;

class Article extends Validate
{
    protected $rule = [
        'title'  =>  'require|max:100|unique:article',
        'keywords'  =>  'require|max:150',
    ];
    protected $message  =   [
    'title.require' => '标题不能为空',
    'title.max' => '标题不超过100位',
    'title.unique' => '标题不能重复',
    'keywords.require'=>'关键字不能为空',
    'keywords.max' => '关键字不能超过150',
];
    protected $scene = [
        'edit'  =>  ['title'],
    ];


}